package www.kingee.socket;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;

public class ClientThread
  implements Runnable
{
  Socket s = null;
  BufferedReader br = null;

  public ClientThread(Socket s) throws IOException { this.s = s;
    this.br = new BufferedReader(new InputStreamReader(s.getInputStream())); }

  public void run()
  {
    try {
      String content = null;
      while ((content = this.br.readLine()) != null)
        System.out.println(content);
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }
}
